import Vue from 'vue'
import Router from 'vue-router'
// 首页
import Layout from '@/views/layout'

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    { path: '/login', component: () => import('@/views/login/login'), hidden: true },
    { path: '/404', component: () => import('@/views/404'), hidden: true },
    {
      path: '/selectSystem',
      name: '选择进入的系统',
      component: () => import('@/views/selectSystem')
    },
    {
      path: '/',
      component: Layout,
      redirect: '/dashboard',
      name: '首页',
      hidden: true,
      children: [{
        path: 'dashboard',
        component: () => import('@/views/dashboard/index')
      }]
    },
    {
      path: '/configuration',
      component: Layout,
      name: '配置管理',
      meta: { title: '配置管理' },
      children: [
        {
          path: 'configArgNotice',
          name: '配置参数管理',
          component: () => import('@/views/configuration/configArg'),
          meta: { title: '配置参数管理' }
        }
      ]
    },
    {
      path: '/onsite',
      component: Layout,
      name: '站内信管理',
      meta: { title: '站内信管理' },
      children: [
        {
          path: 'schoolNoticeManagement',
          name: '校内公告管理',
          component: () => import('@/views/announcement/index'),
          meta: { title: '校内公告管理' }
        },
        {
          path: 'noticeManagement',
          name: '公告管理',
          component: () => import('@/views/announcement/noticeManagement'),
          meta: { title: '公告管理' }
        }
      ]
    },
    {
      path: '/userNotice',
      component: Layout,
      name: '用户管理',
      meta: { title: '用户管理' },
      children: [
        {
          path: 'teacherNotice',
          name: '教工账号管理',
          component: () => import('@/views/userNotice/teacherNotice'),
          meta: { title: '教工账号管理' }
        },
        {
          path: 'studentNotice',
          name: '学生信息管理',
          component: () => import('@/views/userNotice/studentNotice'),
          meta: { title: '学生信息管理' }
        },
        {
          path: 'studentMoveNotice',
          name: '学生异动信息管理',
          component: () => import('@/views/userNotice/studentMoveNotice'),
          meta: { title: '学生异动信息管理' }
        },
        {
          path: 'studentBankCardChange',
          name: '学生银行卡变更审核',
          component: () => import('@/views/userNotice/studentBankCardChange'),
          meta: { title: '学生银行卡变更审核' }
        }
      ]
    },
    {
      path: '/democracy',
      component: Layout,
      name: '民主评议管理',
      meta: { title: '民主评议管理' },
      children: [
        {
          path: 'democracySet',
          name: '民主互评设置',
          component: () => import('@/views/democracy/democracySet'),
          meta: { title: '民主互评设置' }
        },
        {
          path: 'democracyStatistical',
          name: '民主互评反馈信息统计',
          component: () => import('@/views/democracy/democracyStatistical'),
          meta: { title: '民主互评反馈信息统计' }
        },
        {
          path: 'democracyInfo',
          name: '民主互评信息填报',
          component: () => import('@/views/democracy/democracyInfo'),
          meta: { title: '民主互评信息填报' }
        }
      ]
    },
    {
      path: '/data',
      component: Layout,
      name: '资料审批',
      meta: { title: '资料审批' },
      children: [
        {
          path: 'dataStatistical',
          name: '统计信息',
          component: () => import('@/views/data/dataStatistical'),
          meta: { title: '统计信息' }
        },
        {
          path: 'dataResult',
          name: '认定结果变更',
          component: () => import('@/views/data/dataResult'),
          meta: { title: '认定结果变更' }
        }
      ]
    },
    {
      path: '/financial',
      component: Layout,
      name: '金融知识竞赛',
      meta: { title: '金融知识竞赛' },
      children: [
        {
          path: 'financialKnowGame',
          name: '参与情况',
          component: () => import('@/views/financial/financialKnowGame'),
          meta: { title: '参与情况' }
        }
      ]
    }
  ],
  linkActiveClass: 'active-router',
  linkExactActiveClass: 'exact-router'
})
